package com.blacktry.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author blackTry
 * @since 2021-01-31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Lend对象", description="")
public class Lend implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "流水号")
    @TableId(value = "ser_num", type = IdType.AUTO)
    private Long serNum;

    @ApiModelProperty(value = "图书号")
    private Long bookId;

    @ApiModelProperty(value = "读者卡号")
    private Integer readerId;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "借出日期")
    private Date lendDate;

    @ApiModelProperty(value = "归还日期")
    private Date backDate;

    @ApiModelProperty(value = "借阅状态(0正在借阅,1完成借阅,-1异常终止)")
    private Integer state;

    @ApiModelProperty(value = "乐观锁")
    @Version
    private Integer version;

    @ApiModelProperty(value = "逻辑删除")
    @TableLogic
    private Integer deleted;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @ApiModelProperty(value = "上次更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;


}
